<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.Map" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<% pageContext.setAttribute("key1","page");%>


 ${pageScope.key1} <br>
 ${requestScope.key1} <br>
 ${sessionScope.key1} <br>
 ${applicationScope.key1} <br>

 ${key2}<br>
 ${key3}
 ${key3.username}
 ${key3.password}
 <br>
 ${key4}
 ${key4[0]}
 ${key4[1]}
 <br>
 ${key5}
 ${key5[0]}
 ${key5[0].username}
 ${key5[0].password}
 <br>
 ${key6}
 ${key6.a1}
 ${key6.a1.username}
 ${key6.a1.password}
 ${key6['a2']}
 <br>
<%= request.getMethod()%><br>
<%= request.getServerPort()%><br>
<%= request.getContextPath()%><br>
<%= request.getSession().getId()%><br>
<br>-----------------
${pageContext.request.method}<br>
${pageContext.request.serverPort}<br>
${pageContext.request.contextPath}<br>
${pageContext.session.id}<br>

------
<%    request.setAttribute("emptyNull",null);
      request.setAttribute("emptyStr","123");
      request.setAttribute("emptyArr",new Object[]{});
      request.setAttribute("emptyList",new ArrayList<String>().add("lisi"));
 Map<String, Object> map = new HashMap<>();
 map.put("a..", "wangwu");
      request.setAttribute("emptyMap",map);
%>
<%--el empty判断是否为空--%>
${empty emptyNull} <br>
${empty emptyStr}<br>
${empty emptyArr}<br>
${empty emptyList}<br>
${empty emptyMap}<br>

<%--三元运算符--%>
----
${5 eq 5? "true":"false"}
${emptyMap["a.."]}
</body>
</html>
